Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@statoscope/webpack-model
Advanced tools
This package contains helpers to process webpack stats
@statoscope/webpack-model is a tool designed to help developers analyze and understand their Webpack bundle. It provides a model for Webpack stats that can be used to extract insights, generate reports, and optimize the bundle.
Load Webpack Stats
This feature allows you to load Webpack stats from a JSON file. The `readStats` function reads the stats file and returns a JavaScript object representing the stats.
const { readStats } = require('@statoscope/webpack-model');
const stats = readStats('path/to/webpack-stats.json');
console.log(stats);
Generate Reports
This feature allows you to generate a report from the Webpack stats. The `generateReport` function takes the stats object and returns a detailed report that can be used to analyze the bundle.
const { generateReport } = require('@statoscope/webpack-model');
const stats = readStats('path/to/webpack-stats.json');
const report = generateReport(stats);
console.log(report);
Compare Stats
This feature allows you to compare two sets of Webpack stats. The `compareStats` function takes two stats objects and returns a comparison report highlighting the differences between the two bundles.
const { compareStats } = require('@statoscope/webpack-model');
const stats1 = readStats('path/to/webpack-stats-1.json');
const stats2 = readStats('path/to/webpack-stats-2.json');
const comparison = compareStats(stats1, stats2);
console.log(comparison);
webpack-bundle-analyzer is a tool that provides an interactive visualization of your Webpack bundle. It helps you understand the size of your bundle and identify which modules are contributing to the size. Unlike @statoscope/webpack-model, it focuses more on visual representation and less on generating detailed reports.
source-map-explorer analyzes JavaScript bundles using source maps. It helps you understand which files and modules are contributing to the size of your bundle. Compared to @statoscope/webpack-model, it is more focused on source maps and less on providing a comprehensive model for Webpack stats.
webpack-stats-plugin is a Webpack plugin that generates a stats JSON file for your bundle. It is similar to @statoscope/webpack-model in that it provides stats, but it does not offer the same level of analysis and reporting capabilities.
5.28.3 (11 November 2024) (it's alive 🤘)
[webpack-model]
- fix node_modules instance path for module-federation modules[stats-validator-plugin-webpack]
- fix no-packages-dups
-rule to work with module-federation modulesFAQs
This package contains helpers to process webpack stats
The npm package @statoscope/webpack-model receives a total of 94,428 weekly downloads. As such, @statoscope/webpack-model popularity was classified as popular.
We found that @statoscope/webpack-model demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.